home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 14 / Mac Magazin and MacEasy Magazine CD - Issue 14.iso / Wissenschaft & Technik / MacGzip 1.0b0 / Mac / Internet Config / ICCAPI.h < prev    next >
Text File  |  1995-04-23  |  7KB  |  138 lines

  1. /*
  2.     IMPORTANT NOTES ABOUT THE C CONVERSION
  3.     --------------------------------------
  4.     
  5.     o Pascal "var" parameters are converted from "var x : y" to "y *x".  This
  6.       means that when you see the parameter "y *x" you should be aware that
  7.             you *cannot pass in nil*.  In future this restriction may be eased,
  8.             especially for the attr parameter to ICGetPref.  Parameters where nil
  9.             is legal are declared using the explicit pointer type, ie "yPtr x".
  10.  
  11.     o Strings are *Pascal* strings.  This means that they must be word aligned.
  12.         MPW and Think C do this automatically.  The last time I check, Metrowerks
  13.         C does not.  If it still doesn't, then IMHO it's a bug in their compiler
  14.         and you should report it to them.
  15.  
  16.     o The canonical Internet Config interface is defined in Pascal.  These
  17.         headers have not been thoroughly tested.  If there is a conflict between
  18.         these headers and the Pascal interfaces, the Pascal should take precedence.
  19. */
  20.  
  21. /* ///////////////////////////////////////////////////////////////////////////////// */
  22.  
  23. #ifndef __ICCAPI__
  24. #define __ICCAPI__
  25.  
  26. #ifndef __TYPES__
  27. #include <Types.h>
  28. #endif
  29.  
  30. #ifndef __FILES__
  31. #include <Files.h>
  32. #endif
  33.  
  34. #ifndef __COMPONENTS__
  35. #include <Components.h>
  36. #endif
  37.  
  38. #ifndef __ICTYPES__
  39. #include <ICTypes.h>
  40. #endif
  41.  
  42. #ifndef __ICKEYS__
  43. #include <ICKeys.h>
  44. #endif
  45.  
  46. /* //////////////////////////////////////////////////////////////////////////////// */
  47.  
  48. enum {
  49.     internetConfigurationComponentType = 'PREF',                            /* the component type */
  50.     internetConfigurationComponentSubType = 'ICAp',                      /* the component subtype */
  51.     internetConfigurationComponentInterfaceVersion0 = 0x00000000L,
  52.     internetConfigurationComponentInterfaceVersion1 = 0x00010000L,
  53.     /* current version number is version 1 */
  54.     internetConfigurationComponentInterfaceVersion = internetConfigurationComponentInterfaceVersion1
  55. };
  56.  
  57. typedef ComponentInstance internetConfigurationComponent;
  58.  
  59. #ifdef __cplusplus
  60. extern "C" {
  61. #endif __cplusplus
  62.  
  63.     extern pascal ICError ICCStart(internetConfigurationComponent *inst, OSType creator);
  64.     /* checks for the presence of the Component Manager and the Internet Configuration component */
  65.     /* returns badComponentInstance if it can't find either*/
  66.     /* inst is either nil or a valid component instance */
  67.     /* this routine lets you access the component based implementation with only minimal*/
  68.     /* yucky glue */
  69.     extern pascal ICError ICCStop(internetConfigurationComponent inst);
  70.     /* shut down the component */
  71.  
  72.     pascal ICError ICCFindConfigFile(internetConfigurationComponent inst, short count, ICDirSpecArrayPtr folders)
  73.     FIVEWORDINLINE(0x2F3C, 0x06, 0x02, 0x7000, 0xA82A);
  74.     pascal ICError ICCFindUserConfigFile(internetConfigurationComponent inst, ICDirSpec *where);
  75.     FIVEWORDINLINE(0x2F3C, 0x04, 0x0E, 0x7000, 0xA82A);
  76.     pascal ICError ICCSpecifyConfigFile(internetConfigurationComponent inst, FSSpec config)
  77.     FIVEWORDINLINE(0x2F3C, 0x04, 0x03, 0x7000, 0xA82A);
  78.  
  79.     pascal ICError ICCGetSeed(internetConfigurationComponent inst, long *seed)
  80.     FIVEWORDINLINE(0x2F3C, 0x04, 0x04, 0x7000, 0xA82A);
  81.     pascal ICError ICCGetPerm(internetConfigurationComponent inst, ICPerm *perm)
  82.     FIVEWORDINLINE(0x2F3C, 0x04, 0x0D, 0x7000, 0xA82A);
  83.  
  84.     pascal ICError ICCBegin(internetConfigurationComponent inst, ICPerm perm)
  85.     FIVEWORDINLINE(0x2F3C, 0x02, 0x05, 0x7000, 0xA82A);
  86.     pascal ICError ICCGetPref(internetConfigurationComponent inst, ConstStr255Param key, ICAttr *attr, Ptr buf, long *size)
  87.     FIVEWORDINLINE(0x2F3C, 0x10, 0x06, 0x7000, 0xA82A);
  88.     pascal ICError ICCSetPref(internetConfigurationComponent inst, ConstStr255Param key, ICAttr attr, Ptr buf, long size)
  89.     FIVEWORDINLINE(0x2F3C, 0x10, 0x07, 0x7000, 0xA82A);
  90.     pascal ICError ICCGetPrefHandle(internetConfigurationComponent inst, ConstStr255Param key, ICAttr *attr, Handle *prefh);
  91.     FIVEWORDINLINE(0x2F3C, 0x0C, 0x1A, 0x7000, 0xA82A);
  92.     pascal ICError ICCSetPrefHandle(internetConfigurationComponent inst, ConstStr255Param key, ICAttr attr, Handle prefh);
  93.     FIVEWORDINLINE(0x2F3C, 0x0C, 0x1B, 0x7000, 0xA82A);
  94.     pascal ICError ICCCountPref(internetConfigurationComponent inst, long *count)
  95.     FIVEWORDINLINE(0x2F3C, 0x04, 0x08, 0x7000, 0xA82A);
  96.     pascal ICError ICCGetIndPref(internetConfigurationComponent inst, long n, Str255 key)
  97.     FIVEWORDINLINE(0x2F3C, 0x08, 0x09, 0x7000, 0xA82A);
  98.     pascal ICError ICCDeletePref(internetConfigurationComponent inst, ConstStr255Param key)
  99.     FIVEWORDINLINE(0x2F3C, 0x04, 0x0C, 0x7000, 0xA82A);
  100.     pascal ICError ICCEnd(internetConfigurationComponent inst)
  101.     FIVEWORDINLINE(0x2F3C, 0x00, 0x0A, 0x7000, 0xA82A);
  102.  
  103.     pascal ICError ICCDefaultFileName(internetConfigurationComponent inst, Str63 name)
  104.     FIVEWORDINLINE(0x2F3C, 0x04, 0x0B, 0x7000, 0xA82A);
  105.  
  106.     pascal ICError ICCEditPreferences(internetConfigurationComponent inst, ConstStr255Param key);
  107.     FIVEWORDINLINE(0x2F3C, 0x04, 0x0F, 0x7000, 0xA82A);
  108.     pascal ICError ICCParseURL(internetConfigurationComponent inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd, Handle url);
  109.     FIVEWORDINLINE(0x2F3C, 0x04, 0x10, 0x7000, 0xA82A);
  110.     pascal ICError ICCLaunchURL(internetConfigurationComponent inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd);
  111.     FIVEWORDINLINE(0x2F3C, 0x18, 0x11, 0x7000, 0xA82A);
  112.     pascal ICError ICCMapFilename(internetConfigurationComponent inst, ConstStr255Param filename, ICMapEntry *entry);
  113.     FIVEWORDINLINE(0x2F3C, 0x14, 0x18, 0x7000, 0xA82A);
  114.     pascal ICError ICCMapTypeCreator(internetConfigurationComponent inst, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry);
  115.     FIVEWORDINLINE(0x2F3C, 0x08, 0x19, 0x7000, 0xA82A);
  116.     pascal ICError ICCMapEntriesFilename(internetConfigurationComponent inst, Handle entries, ConstStr255Param filename, ICMapEntry *entry);
  117.     FIVEWORDINLINE(0x2F3C, 0x10, 0x1C, 0x7000, 0xA82A);
  118.     pascal ICError ICCMapEntriesTypeCreator(internetConfigurationComponent inst, Handle entries, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry);
  119.     FIVEWORDINLINE(0x2F3C, 0x0C, 0x1D, 0x7000, 0xA82A);
  120.     pascal ICError ICCCountMapEntries(internetConfigurationComponent inst, Handle entries, long *count);
  121.     FIVEWORDINLINE(0x2F3C, 0x14, 0x12, 0x7000, 0xA82A);
  122.     pascal ICError ICCGetIndMapEntry(internetConfigurationComponent inst, Handle entries, long ndx, long *pos, ICMapEntry *entry);
  123.     FIVEWORDINLINE(0x2F3C, 0x08, 0x13, 0x7000, 0xA82A);
  124.     pascal ICError ICCGetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry);
  125.     FIVEWORDINLINE(0x2F3C, 0x10, 0x14, 0x7000, 0xA82A);
  126.     pascal ICError ICCSetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry);
  127.     FIVEWORDINLINE(0x2F3C, 0x0C, 0x15, 0x7000, 0xA82A);
  128.     pascal ICError ICCDeleteMapEntry(internetConfigurationComponent inst, Handle entries, long pos);
  129.     FIVEWORDINLINE(0x2F3C, 0x08, 0x16, 0x7000, 0xA82A);
  130.     pascal ICError ICCAddMapEntry(internetConfigurationComponent inst, Handle entries, ICMapEntry *entry);
  131.     FIVEWORDINLINE(0x2F3C, 0x08, 0x17, 0x7000, 0xA82A);
  132.  
  133. #ifdef __cplusplus
  134. }
  135. #endif __cplusplus
  136.  
  137. #endif
  138.